$(function() {
    var cnt = 5;
    var loginurl = `login.jsp`;
    $('#text').html(`账户和密码不匹配, ${cnt}秒后跳转回<a class="text-href" href="${loginurl}">登陆页面</a> ...`);
    var timer = setInterval(function() {
        cnt -= 1;
        if(cnt > 0) { 
            $('#text').html(`账户和密码不匹配, ${cnt}秒后跳转回<a class="text-href" href="${loginurl}">登陆页面</a> ...`); 
        } else {
            clearInterval(timer);
            window.location.href = loginurl;
        }
    }, 1000);
});